var e = getApp(), t = require("../../utils/timeUtil.js");

Component({
    options: {
        addGlobalClass: !0
    },
    properties: {
        index: Number,
        data: Object,
        isGrayStyle: Boolean
    },
    data: {},
    methods: {
        productOnTap: function(a) {
            var i = a.currentTarget.dataset.data, r = i.productType, d = i.productId, s = null;
            if (1 == r) {
                var l = i.sellTime ? t.timeStringToLong(i.sellTime) : null, o = new Date().getTime();
                s = l && l > o ? "/pages/presell-detail/presell-detail?id=" + d : e.data.myLineInfo && e.data.myLineInfo.productId == d ? "/pages/series/series?productId=" + d + "&queueId=" + e.data.myLineInfo.memberQueueId : "/pages/series/series?productId=" + d;
            } else 0 == r && (s = e.getMallProductPath(d));
            e.isLogin() ? wx.navigateTo({
                url: s
            }) : e.loginThenRedirectTo(!1, s);
        }
    }
});